package cn.aixuxi.notebank.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

/**
 * 类描述 笔记实体类
 *
 * @author ruozhuliufeng
 * @version 1.0
 * @date 2020/10/25 0:14
 */
@Data
@TableName("note")
public class NoteEntity {

    /**
     * MP插入数据时ID自增问题：
     * 设置主键的自增方式
     * @TableId(value = “id”,type = IdType.INPUT) 这种方式是主键手动输入
     * 主键生成方式类型如下（IdType）：
     * AUTO(0, “数据库ID自增”),
     * INPUT(1, “用户输入ID”),
     * ID_WORKER(2, “全局唯一ID”),
     * UUID(3, “全局唯一ID”),
     * NONE(4, “该类型为未设置主键类型”),
     * ID_WORKER_STR(5, “字符串全局唯一ID”);
     * @author : ruozhuliufeng
     * @date : 2020/11/15 15:04
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    private String title;
    private String mdContent;
    private String htmlContent;
    private String tagId;
    private Integer categoryId;
    private Integer userId;
    private String createTime;
    private String createBy;
    private Date updateTime;
    private String updateBy;
    private Integer eyes;
}
